package com.example.demo.control;

import com.example.demo.service.LoginService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

@ResponseBody
@Controller
public class LoginControl {
    @Resource
    LoginService loginService;
    @PostMapping("/login")
    String login(HttpSession session,String account ,String pass){
        return loginService.Login(session,account,pass);
    }
    @PostMapping("/checklogin")
    String checklogin(HttpSession session){
        return loginService.checkLogin(session);
    }

}
